﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using ShakeItClientTest.ServiceReference1;

namespace ShakeItClientTest
{
    public partial class Page1 : PhoneApplicationPage
    {
        public Page1(string id)
        {
            InitializeComponent();
            Service1Client proxy = new Service1Client();
            proxy.FindActivityCompleted += new EventHandler<FindActivityCompletedEventArgs>(proxy_FindActivityCompleted);
            int _id;
            int.TryParse(id, out _id);
            proxy.FindActivityAsync(_id);
        }
        void proxy_FindActivityCompleted(object sender, FindActivityCompletedEventArgs e)
        {
            listBox1.ItemsSource = e.Result;
        }
    }
}